/*
 * app.c
 *
 *  Created on: Jan 3, 2024
 *      Author: 80424
 */
#include "app.h"
#include "main.h"
#include "user_it_callback.h"
#define num 4
/*
 * 模拟旋钮功能
 * 输入参数：采样的角度
 * */
void Shift_Knob(uint16_t Angle)
{
	uint8_t Gear_Position;
	Gear_Position=Angle/(4095/num);
	FOC_Nearest_PositionMode(Gear_Position*(4095/num)+(4095/(num*2)),Angle);
}



